<?PHP
  class colorpicker extends Control{

    public function getCode(){
	  global $colorPickerIncludes;
	  $res = "";
	  if(!$colorPickerIncludes){
	    $colorPickerIncludes = true;
	    $res .= "<script type=\"text/javascript\" src=\"/system/jscolor/jscolor.js\"></script>";
	  }
	$res .=  "<input class=\"color\" name=\"".str_replace("\"","&quot;",htmlentities($this->name))."\" value=\"".str_replace("\"","&quot;",htmlentities($this->value))."\" />";
		return $res;
    }

  }
?>